<!DOCTYPE html>

<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]>    <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]>    <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html lang="en" ng-app="Ajani" ng-controller="AppController"> <!--<![endif]-->
<head>
    <meta charset="utf-8" />

    <!-- Set the viewport width to device width for mobile -->
    <meta name="viewport" content="width=device-width" />

    <title>Ajani</title>
  
    <!-- Included CSS Files -->
    <!-- <link rel="stylesheet" href="/css/foundation.css"> -->
    <link rel="stylesheet" href="/css/app.css">
    <link rel="stylesheet" href="/css/select2.css">

    <!--[if lt IE 9]>
        <link rel="stylesheet" href="/css/ie.css">
    <![endif]-->


    <!-- IE Fix for HTML5 Tags -->
    <!--[if lt IE 9]>
        <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

</head>
<body>

    <!-- navbar -->
    {% if doing_bootstrap %}
        <div class="container">
            {% include 'bootstrap.html' %}
        </div>
        <script src="/js/jm.js"></script>
        <script src="/js/foundation.js"></script>
        <script src="/_ah/channel/jsapi"></script>
        <script src="/js/bootstrap.js"></script>
    {% else %}
        <ng-include src="'/partials/nav.html'" onload="topbar()"></ng-include>
        <!-- END navbar -->

        <div class="container">
            <ng-view></ng-view>
        </div>

        <div class="footer">
            <ng-include src="'/partials/footer.html'"></ng-include>
        </div>

        <div id="loginRequiredModal" class="reveal-modal medium">
            <h4>Login Required</h4>
            <p>You need to be signed in to complete your action.</p>
            <button class="button success"><i class="icon-signin"></i> Sign in</button>
            <button class="button secondary"><i class="icon-ban-circle"></i> Cancel</button>
        </div>

        <div id="welcomeFirstModal" class="reveal-modal medium">
            <h4>Welcome, {{ cUser.display }}</h4>
            <p style="text-align:center;">You will be redirected to where you came from shortly...</p>
            <div style="width:100%; height: 60px; text-align: center;">
                <img src="/img/35.gif" alt="">
            </div>
        </div>

        <div id="itemDetailsModal" class="reveal-modal expand">
            <h2>{{ itemDetails.item.title }}</h2>
            <div class="itemview image">
                <a ui-if="itemDetails.imgs" href="#"><img ng-src="{{itemDetails.imgs.orig}}"></a>
                <h3 ui-if="!itemDetails.imgs">No Image</h3>
            </div>
            <div class="itemview content" ng-bind-html="itemDetails.item.desc.raw"></div>
        </div>

        <div id="newMessageItemModal" class="reveal-modal large">
            <h4>Send Private Message to {{ msgItm.rec.display }}</h4>
            <form name="newMessageItemForm" novalidate>
                <div class="row">
                    <div class="two columns">
                        <label class="right inline" for="title">Title :</label>
                    </div>
                    <div class="ten columns">
                        <input type="text" name="title" id="title" ng-model="msgItm.title">
                    </div>
                </div>
                <div class="row">
                    <div class="two columns">
                        <label class="right inline" for="content">Content :</label>
                    </div>
                    <div class="ten columns">
                        <div id="content-toolbar" class="text-toolbar">
                            <div class="toolbars">
                                <div data-wysihtml5-command="bold" title="Make text bold (CTRL + B)" class="command"><div><i class="icon-bold"></i></div></div>
                                <div data-wysihtml5-command="italic" title="Make text italic (CTRL + I)" class="command"><div><i class="icon-italic"></i></div></div>
                                <div data-wysihtml5-command="underline" title="Make text underline (CTRL + U)" class="command"><div><i class="icon-underline"></i></div></div>
                                <div data-wysihtml5-command="insertUnorderedList" title="Insert an unordered list" class="command"><div><i class="icon-list-ul"></i></div></div>
                                <div data-wysihtml5-command="insertOrderedList" title="Insert an ordered list" class="command"><div><i class="icon-list-ol"></i></div></div>
                                <div data-wysihtml5-command="justifyLeft" title="Align to left" class="command"><div><i class="icon-align-left"></i></div></div>
                                <div data-wysihtml5-command="justifyCenter" title="Align to center" class="command"><div><i class="icon-align-center"></i></div></div>
                                <div data-wysihtml5-command="justifyRight" title="Align to right" class="command"><div><i class="icon-align-right"></i></div></div>
                                <div data-wysihtml5-command="formatBlock" data-wysihtml5-command-value="p" class="command"><div>P</div></div>
                                <div data-wysihtml5-command="formatBlock" data-wysihtml5-command-value="h1" class="command"><div>H1</div></div>
                                <div data-wysihtml5-command="formatBlock" data-wysihtml5-command-value="h2" class="command"><div>H2</div></div>
                                <div data-wysihtml5-command="formatBlock" data-wysihtml5-command-value="h3" class="command"><div>H3</div></div>
                                <div data-wysihtml5-command="formatBlock" data-wysihtml5-command-value="h4" class="command"><div>H4</div></div>
                            </div>
                        </div>
                        <textarea text-editor="1" name="content" id="content" cols="30" rows="10" ng-model="msgItm.content"></textarea>
                    </div>
                </div>
                <div class="row">
                    <div class="two columns">
                        <label class="right inline">Related Item :</label>
                    </div>
                    <div class="ten columns">
                        <div style="margin-top:8px;"><strong>{{ msgItm.item.title }}</strong></div>
                    </div>
                </div>
                <div class="row">
                    <div class="two columns">
                        
                    </div>
                    <div class="ten columns">
                        <button item-send-message class="button success radius"><i class="icon-ok icon-large"></i> Send</button>
                        <button class="button alert radius close-reveal-modal"><i class="icon-ban-circle icon-large"></i> Cancel</button>
                    </div>
                </div>
            </form>
        </div>

        <div id="newMessageModal" class="reveal-modal large">
            <h4>Send Private Message</h4>
            <form name="newMessageForm" novalidate>
                <div class="row">
                    <div class="two columns">
                        <label class="right inline">To :</label>
                    </div>
                    <div class="ten columns">
                        <!-- <div style="margin-top:8px;"><strong>{{ msgNew.to.display }} ({{ msgNew.to.name }})</strong></div> -->
                        <input type="text" name="to" id="to" ng-model="msgNew.to.display" ng-disabled="msgNew.reply">
                    </div>
                </div>
                <div class="row">
                    <div class="two columns">
                        <label class="right inline" for="title">Title :</label>
                    </div>
                    <div class="ten columns">
                        <input type="text" name="title" id="title" ng-model="msgNew.title">
                    </div>
                </div>
                <div class="row">
                    <div class="two columns">
                        <label class="right inline" for="contentnew">Content :</label>
                    </div>
                    <div class="ten columns">
                        <div id="contentnew-toolbar" class="text-toolbar">
                            <div class="toolbars">
                                <div data-wysihtml5-command="bold" title="Make text bold (CTRL + B)" class="command"><div><i class="icon-bold"></i></div></div>
                                <div data-wysihtml5-command="italic" title="Make text italic (CTRL + I)" class="command"><div><i class="icon-italic"></i></div></div>
                                <div data-wysihtml5-command="underline" title="Make text underline (CTRL + U)" class="command"><div><i class="icon-underline"></i></div></div>
                                <div data-wysihtml5-command="insertUnorderedList" title="Insert an unordered list" class="command"><div><i class="icon-list-ul"></i></div></div>
                                <div data-wysihtml5-command="insertOrderedList" title="Insert an ordered list" class="command"><div><i class="icon-list-ol"></i></div></div>
                                <div data-wysihtml5-command="justifyLeft" title="Align to left" class="command"><div><i class="icon-align-left"></i></div></div>
                                <div data-wysihtml5-command="justifyCenter" title="Align to center" class="command"><div><i class="icon-align-center"></i></div></div>
                                <div data-wysihtml5-command="justifyRight" title="Align to right" class="command"><div><i class="icon-align-right"></i></div></div>
                                <div data-wysihtml5-command="formatBlock" data-wysihtml5-command-value="p" class="command"><div>P</div></div>
                                <div data-wysihtml5-command="formatBlock" data-wysihtml5-command-value="h1" class="command"><div>H1</div></div>
                                <div data-wysihtml5-command="formatBlock" data-wysihtml5-command-value="h2" class="command"><div>H2</div></div>
                                <div data-wysihtml5-command="formatBlock" data-wysihtml5-command-value="h3" class="command"><div>H3</div></div>
                                <div data-wysihtml5-command="formatBlock" data-wysihtml5-command-value="h4" class="command"><div>H4</div></div>
                            </div>
                        </div>
                        <textarea text-editor="1" name="contentnew" id="contentnew" cols="30" rows="10" ng-model="msgNew.content"></textarea>
                    </div>
                </div>
                <div class="row">
                    <div class="two columns">
                        
                    </div>
                    <div class="ten columns">
                        <button item-send-message class="button success radius"><i class="icon-ok icon-large"></i> Send</button>
                        <button class="button alert radius close-reveal-modal"><i class="icon-ban-circle icon-large"></i> Cancel</button>
                    </div>
                </div>
            </form>
        </div>

        <div id="viewMessageModal" class="reveal-modal large">
            <h4>{{ msgViw.msg.title }}</h4>
            <div class="messageview meta"><strong>From : {{ msgViw.user.name }}</strong></div>
            <div ui-if="msgViw.item.id" class="messageview meta"><strong>Related Item : {{ msgViw.item.title }}</strong></div>
            <div class="messageview content" ng-bind-html="msgViw.msg.content.raw"></div>
            <button class="button radius success"><i class="icon-reply icon-large"></i> Reply</button>
            <button class="button radius secondary close-reveal-modal"><i class="icon-ban-circle icon-large"></i> Close</button>
        </div>

        <!-- Included JS Files -->
        <script src="/js/jm.js"></script>
        <script src="/js/foundation.js"></script>
        <script src="/js/lib.js"></script>
        <!-- <script src="/js/jquery.iframe-transport.js"></script>
        <script src="/js/jquery.fileupload.js"></script>
        <script src="/js/jquery.textchange.js"></script>
        <script src="/js/load-image.js"></script>
        <script src="/js/canvas-to-blob.js"></script>
        <script src="/js/jquery.fileupload-fp.js"></script>
        <script src="/js/select2.js"></script>
        <script src="/js/advanced.js"></script>
        <script src="/js/wysihtml5-0.3.0.js"></script> -->
        <script src="/js/angular/angular.min.js"></script>
        <script src="/js/angular/angular-resource.min.js"></script>
        <script src="/js/angular/angular-sanitize.min.js"></script>
        <script src="/js/ui/angular-ui.min.js"></script>
        <script src="/js/app.js"></script>
    {% endif %}

</body>
</html>